/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

// eslint-disable-next-line import/no-extraneous-dependencies
import { Request, Response } from 'express';
import { mock } from 'mockjs';
import { responseSuccess } from './utils';

export default {
  'POST /CustomerServiceV2/ivrTemplate': (req: Request, res: Response) => {
    return res.json(
      mock({
        code: 0,
        msg: '成功',
        data: {
          'pageTotal|10-100': 10,
          'recordTotal|10-100': 10,
          pageNumber: '1',
          'list|5-10': [
            {
              courier_name: '@cname',
              courier_tel: /13\d{9}$/,
              'brand|1': ['sto', 'zt'],
              branch_name: '公司名称',
              create_time: '@datetime',
              'ivid|+1': 1,
              complaints: '0',
              complaint_time: '0000-00-00 00:00:00',
              path:
                'http://upload.kuaidihelp.com/ivr_voice_new/2018_04/1167207201804090459389326.wav',
              voice_second: '6',
              operator: '蔡玲玲',
              operate_time: '@datetime',
              state: '0',
            },
          ],
        },
      }),
    );
  },
  'POST /cloudCall/blackList': (req: Request, res: Response) => {
    return res.json(
      mock({
        code: 0,
        msg: '成功',
        data: {
          'pageTotal|10-100': 10,
          pageNumber: '1',
          'list|0-10': [
            {
              courier_name: '@cname',
              'complaint_total|0-10': 1,
              courier_tel: /13\d{9}$/,
              'brand|1': ['sto', 'zt'],
              branch_name: '公司名称',
              time: '@datetime',
              reason: '@csentence',
            },
          ],
        },
      }),
    );
  },

  'POST /cloudCall/moveoutBlackList': responseSuccess,
  'POST /cloudCall/templateCheck': responseSuccess,
  'POST /cloudCall/templateReject': responseSuccess,
  'POST /cloudCall/templateBlack': responseSuccess,
};
